<template>
  <t-dialog
    header="已排序需求征集表"
    :visible.sync="visible"
    :onClose="closeDialog"
    :closeOnOverlayClick="false"
    :confirm-btn="null"
    width="80%"
    top="5%"
  >
    <div style="height: 65vh">
      <t-table
        rowKey="id"
        :data="data"
        :columns="columns"
        hover
        :loading="dataLoading"
      >
      </t-table>
    </div>
  </t-dialog>
</template>

<script>
export default {
  name: "reviewed-special-plan-list",
  props:{
    objId: {
      type: Number,
    }
  },
  data(){
    return {
      visible: true,
      dataLoading: false,
      data: [],
      columns: [
        {
          colKey: "sort",
          title: "在本组中的排序",
          align: "center",
        },
        {
          colKey: "specialPlan.projectName",
          title: "研发需求",
          align: "center",
        },
      ],
    }
  },
  created() {
    this.getList();
  },
  methods:{
    getList() {
      this.$api.ggxq.specialPlan.getMySortList({ teamId:this.objId,pageNum:1,pageSize:10000 }).then(response => {
        this.data = response.rows
      }).catch((e) => {
        this.$message.error(e.toString());
      });
    },
    closeDialog() {
      this.$emit("update:visible", false);
    },
  }
}
</script>

<style scoped>

</style>
